
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.story.shared_state</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.story.html"><font color="#ffffff">story</font></a>.shared_state</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/story/shared_state.py">telemetry/story/shared_state.py</a></font></td></tr></table>
    <p><tt>#&nbsp;Copyright&nbsp;2014&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.story.shared_state.html#SharedState">SharedState</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SharedState">class <strong>SharedState</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;class&nbsp;that&nbsp;manages&nbsp;the&nbsp;test&nbsp;state&nbsp;across&nbsp;multiple&nbsp;stories.<br>
It's&nbsp;styled&nbsp;on&nbsp;unittest.TestCase&nbsp;for&nbsp;handling&nbsp;test&nbsp;setup&nbsp;&amp;&nbsp;teardown&nbsp;logic.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SharedState-CanRunStory"><strong>CanRunStory</strong></a>(self, story)</dt><dd><tt>Indicate&nbsp;whether&nbsp;the&nbsp;story&nbsp;can&nbsp;be&nbsp;run&nbsp;in&nbsp;the&nbsp;current&nbsp;configuration.<br>
This&nbsp;is&nbsp;called&nbsp;after&nbsp;WillRunStory&nbsp;and&nbsp;before&nbsp;RunStory.&nbsp;Return&nbsp;True<br>
if&nbsp;the&nbsp;story&nbsp;should&nbsp;be&nbsp;run,&nbsp;and&nbsp;False&nbsp;if&nbsp;it&nbsp;should&nbsp;be&nbsp;skipped.<br>
Most&nbsp;subclasses&nbsp;will&nbsp;probably&nbsp;want&nbsp;to&nbsp;override&nbsp;this&nbsp;to&nbsp;always<br>
return&nbsp;True.<br>
Args:<br>
&nbsp;&nbsp;story:&nbsp;a&nbsp;story.Story&nbsp;instance.</tt></dd></dl>

<dl><dt><a name="SharedState-DidRunStory"><strong>DidRunStory</strong></a>(self, results)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;after&nbsp;running&nbsp;each&nbsp;of&nbsp;all&nbsp;stories&nbsp;that<br>
share&nbsp;this&nbsp;same&nbsp;state.<br>
This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.tearDown.</tt></dd></dl>

<dl><dt><a name="SharedState-RunStory"><strong>RunStory</strong></a>(self, results)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;before&nbsp;running&nbsp;each&nbsp;one&nbsp;of&nbsp;all&nbsp;stories<br>
that&nbsp;share&nbsp;this&nbsp;same&nbsp;state.<br>
This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.run.</tt></dd></dl>

<dl><dt><a name="SharedState-TearDownState"><strong>TearDownState</strong></a>(self)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;after&nbsp;running&nbsp;multiple&nbsp;stories&nbsp;that<br>
share&nbsp;this&nbsp;same&nbsp;state.<br>
This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.tearDownClass.</tt></dd></dl>

<dl><dt><a name="SharedState-WillRunStory"><strong>WillRunStory</strong></a>(self, story)</dt><dd><tt>Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;before&nbsp;running&nbsp;each&nbsp;one&nbsp;of&nbsp;all&nbsp;stories<br>
that&nbsp;share&nbsp;this&nbsp;same&nbsp;state.<br>
This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.setUp.</tt></dd></dl>

<dl><dt><a name="SharedState-__init__"><strong>__init__</strong></a>(self, test, options, story_set)</dt><dd><tt>This&nbsp;method&nbsp;is&nbsp;styled&nbsp;on&nbsp;unittest.TestCase.setUpClass.<br>
Override&nbsp;to&nbsp;do&nbsp;any&nbsp;action&nbsp;before&nbsp;running&nbsp;stories&nbsp;that<br>
share&nbsp;this&nbsp;same&nbsp;state.<br>
Args:<br>
&nbsp;&nbsp;test:&nbsp;a&nbsp;page_test.PageTest&nbsp;or&nbsp;story_test.StoryTest&nbsp;instance.<br>
&nbsp;&nbsp;options:&nbsp;a&nbsp;BrowserFinderOptions&nbsp;instance&nbsp;that&nbsp;contains&nbsp;command&nbsp;line<br>
&nbsp;&nbsp;&nbsp;&nbsp;options.<br>
&nbsp;&nbsp;story_set:&nbsp;a&nbsp;story.StorySet&nbsp;instance.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>platform</strong></dt>
<dd><tt>Override&nbsp;to&nbsp;return&nbsp;the&nbsp;platform&nbsp;which&nbsp;stories&nbsp;that&nbsp;share&nbsp;this&nbsp;same<br>
state&nbsp;will&nbsp;be&nbsp;run&nbsp;on.</tt></dd>
</dl>
</td></tr></table></td></tr></table>
</body></html>